<% layout('/layout/default.html', {title: '首页管理', libs: ['validate','icheck']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-sitemap"></i> 修改首页
			</div>
		</div>
		
		<#form:form id="inputForm"  class="form-horizontal" model = "${xZ59}" action="${ctx}/sys/xz59list/editXz" method="post">
			<div class="box-body">
				<#form:hidden path="id"/>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="id">
								ID:
							</label>
							<div class="col-sm-8">
								<#form:input path="ide" class="form-control" maxlength="50" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="用户名">
								<span class="required" aria-required="true">*</span> 名称: <i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<#form:input path="text" maxlength="50" class="form-control required" />
							</div>
						</div>
					</div>

				</div>
				
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="PID">
								<span class="required" aria-required="true">*</span> PID: <i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<#form:input path="pid" class="form-control" maxlength="50" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="归属部门">
								<span class="required" aria-required="true">*</span> 归属部门: <i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<#form:treeselect id="officeCode" name="office.code" value="${xZ59.code!}" labelName="code"
								labelValue="${xZ59.code!}" title="部门" url="/sys/office/treeData?type=2" notAllowSelectParent="true" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="sql">
								<span class="required" aria-required="true">*</span> sql: <i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8" >
								<#form:textarea path="remark" rows="15" cols="32"  class="form-control"  />
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
					<% if (hasPermi('sys:user:edit')){ %>
						<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
					<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="window.parent.closeCurrentTabPage();"><i class="fa fa-reply-all"></i> 关 闭</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == 'true'){
				window.parent.closeCurrentTabPage(window.parent.refreshTab);
			}
		});
	}
});
</script>